
function doCRUDFile(id, extra){
    var param = 'file_id='+id+''+extra;
    ajax.send('?m=projects&a=file_crud&suppressHeaders=1', param,
		function(r) {
			$('idCRUDFileDialog').innerHTML = r;
			Dialog('idCRUDFileDialog', closeCRUD('idCRUDFile')).show();
			//var cd = Control('idCRUDFile').create('div', 'popup', 'hidden');
			//cd.innerHTML = r;
			//Dialog(cd, closeCRUD('idCRUDFile')).show();
		}
	);
}

function closeCRUD(id){
    Control(id).destroy();
	Dialog(id).hide();
}

function doDelete(id, name)	{
	if (confirm( "Do you want to delete "+ name)) {
		$('del_cc_id').value = id;
		f = $('MdFormDelete');
		f.del.value = id;
		f.submit();
	}
}